-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear cookies when switching accounts #8490
Clear cookies when switching accounts #8490
Conversation
for more information, see https://pre-commit.ci
I failed one of the CI/CD tests by accidentally importing infogami_logout twice. I have since fixed that but need to run the workflow again. |
provisional LGTM, great job -- will state on testing and give it a try |
Taking off testing to test #8550 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks to be working as expected. Thanks, @ClementineAccount!
This closes #8005.
This follows the suggestions proposed by Mek in internetarchive/infogami#215 (comment)
by creating handlers to call a new function that clears the cookies "pd" and "sfw"
Technical
This implementation solves the issue mentioned by clearing the cookies using a handler to infogami, overriding infogami
logout
function. It also does this when 'logging in' as another user from the admin panel ofadmin/people
Testing
(The video below under Screenshot also shows this step)
admin/people
and observe that the pd cookie has been cleared.Screenshot
I recorded this video showcasing the 'pd' cookie being cleared when the hotfix is applied. Prior to the hotfix application, the pd cookie will never be cleared.
2023-11-03.20-31-15.mp4
Stakeholders
@mekarpeles proposed the fix concept and suggested this issue to me as a 'Good First Issue' so he would likely want to review my approach prior to a merge.